package com.smooth.sys.site.modules.sys.utils;

import java.util.List;

import com.smooth.common.site.common.utils.SpringContextHolder;
import com.smooth.dao.gen.BaseCitiesMapper;
import com.smooth.dao.gen.bean.BaseCities;
import com.smooth.dao.gen.bean.BaseCitiesExample;

public class CityUtils {
	private static BaseCitiesMapper baseCitiesMapper = SpringContextHolder.getBean(BaseCitiesMapper.class);
	
	public static String getCityName(String id){
		BaseCities baseCities = baseCitiesMapper.selectByPrimaryKey(id);
		if(baseCities!=null) {
			return baseCities.getCityName();
		}
		return "";
	}
	
	public static List<BaseCities> getCityList(){
		BaseCitiesExample baseCitiesExample = new BaseCitiesExample();
		return baseCitiesMapper.selectByExample(baseCitiesExample);
	}
	
}
